package com.applet.common.constant;

/**
 * @author “XuShao”
 * @date 2024/12/16 18:06
 * @description
 */
public enum ResultConstant {
    SUCCESS(200, "操作成功"),
    FAIL(201, "操作失败"),
    FAIL_DENIED(403, "权限不足"),
    FAIL_NOT_LOGGED_IN(401, "未登录"),
    FAIL_FILL_UPLOAD_VALIDATE_FAIL(202, "文件格式有误！"),
    FAIL_VERIFICATION_FAILED(202, "校验失败"),
    FAIL_SYS_EXCEPTION(500, "系统内部异常"),
    NUMBER_OF_APPLICANTS_IS_FULL(409, "报名人数已满");

    private Integer code;
    private String message;

    private ResultConstant(Integer code){
        this.code = code;
    }

    private ResultConstant(Integer code, String message){
        this.code = code;
        this.message = message;
    }

    public Integer getCode(){
        return this.code;
    }

    public String getMessage(){
        return this.message;
    }
}
